package com.example.smart.ui.activity.home

import com.example.lib.extend.gridManager
import com.example.lib.extend.setOnDoubleClickListener
import com.example.lib.utils.statusbar.StatusBarUtils
import com.example.smart.R
import com.example.smart.adapter.home.VaccinesAdapter
import com.example.smart.base.ui.activity.BaseActivity
import com.example.smart.databinding.ActivityVaccinesListBinding
import com.example.smart.utils.DisplayUtils

class VaccinesListActivity : BaseActivity<ActivityVaccinesListBinding>() {

    private val mAdapter by lazy {
        VaccinesAdapter(this@VaccinesListActivity)
    }

    override fun layoutID() = R.layout.activity_vaccines_list

    override fun initView() {
        StatusBarUtils.setStateAndNavigationBar(this@VaccinesListActivity, statusBarColor = com.example.lib.R.color.translate)
        binding.TopRecycler.gridManager(3)
        binding.TopRecycler.adapter = mAdapter
        binding.BottomRecycler.gridManager(3)
        binding.BottomRecycler.adapter = mAdapter
    }

    override fun initListener() {
        binding.Search.setOnDoubleClickListener {
            DisplayUtils.toSearch(this@VaccinesListActivity)
        }
    }
}